<%@ page contentType="text/html;charset=UTF-8" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
	<script type="text/javascript" src="static/js/login.js"></script>
	<title>登录页</title>
</head>

<body>
	
	<div id="message" class="alert alert-danger" style="display: none;">
		<!-- <button data-dismiss="alert" class="close">×</button> -->
	</div>
	<form id="loginForm" action="${ctx}/login" method="post" class="form-horizontal">
	
		<div class="control-group">
			<label for="username" class="control-label">名称:</label>
			<div class="controls">
				<input type="text" id="username" name="loginName" class="input-medium required"/>
			</div>
		</div>
		<div class="control-group">
			<label for="password" class="control-label">密码:</label>
			<div class="controls">
				<input type="password" id="password" name="plainPassword" class="input-medium required"/>
			</div>
		</div>
		<div class="control-group">
			<label for="password" class="control-label">验证码:</label>
			<div class="controls">
				<input type="text" id="imgCode" name="imgCode" class="input-medium"/>
				<img id="captcha" src="${ctx}/login/captcha" onclick="this.src = '${ctx}/login/captcha?v=' + Math.random()" height="35" style="vertical-align: middle;border: 1px solid #ccc;border-radius:4px;cursor: pointer;" />
			</div>
		</div>
		<div class="control-group">
			<div class="controls">
				<label class="checkbox" for="rememberMe"><input type="checkbox" id="rememberMe" name="rememberMe"/> 记住我</label>
				<input id="submit_btn" class="btn btn-primary" type="submit" value="登录"/> <a class="btn" href="${ctx}/register">注册</a>
			 	<span class="help-block"></span>
			</div>
		</div>
	</form>
</body>
</html>
